<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>江苏天鼎</title>
    <link rel="stylesheet" type="text/css" href="css/styleUI.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/swiper-3.4.2.min.css">
</head>
<body>
<div id="header" class="con">
    <a href="javascript:void(0);" class="ufl">网站导航</a>
    <a href="javascript:void(0);" class="ufr icon icon-phone">客服热线：025-962155</a>
    <a href="javascript:void(0);" class="ufr icon icon-account">汇款方式</a>
    <a href="javascript:void(0);" class="ufr icon icon-user">人员招聘</a>
</div>
<div id="top" class="con ub ub-ac">
    <div class="logoIcon"></div>
    <div class="logoText"></div>
    <div class="logoVerse ub ub-ver ub-ac ub-pc">
        <div class="logoPot">天鼎证券</div>
        <div class="number">编号:913200001347857395</div>
    </div>
    <div class="slogan">成为中国专业度第一名投资理财平台</div>
    <div class="ub-f ub ub-ac ub-pe">
        <input type="search" class="searchInput" placeholder="请输入关键字查询">
        <div class="searchBtn">搜索</div>
    </div>
</div>
<div id="nav">
    <div class="con ub">
        <a href="index.html" class="ub ub-ac ub-pc ub-f">首页</a>
        <a href="javascript:void(0);" class="ub ub-ac ub-pc ub-f">产品中心</a>
        <a href="videoLive.html" class="ub ub-ac ub-pc ub-f">名师直播</a>
        <a href="javascript:void(0);" class="ub ub-ac ub-pc ub-f">师资团队</a>
        <a href="javascript:void(0);" class="ub ub-ac ub-pc ub-f">天鼎基金</a>
        <a href="javascript:void(0);" class="ub ub-ac ub-pc ub-f">公司介绍</a>
    </div>
</div>
<div id="content" class="con uf">
    <div class="uf-f planeCon">
        <div class="pageIndex">现在您的位置：<a href="index.html">主页</a>&gt;<a>用户评论</a></div>
        <div class="uf uf-pj uf-ac">
            <div class="comTitle">评论滚动</div>
            <div class="refresh">
                <div class="icon-refresh"></div>
            </div>
        </div>
        <div class="container">

        </div>
    </div>
    <div class="planeRight">
        <div class="newsTTLine uf uf-ae">
            <div class="newsTTT">新闻<br>news</div>
            推荐阅读
        </div>
        <div class="picNewsByText side">
            <a href="javascript:void(0);" class="title">全国夏粮再获丰收 居历史第二位</a>
            <div class="ub">
                <a class="pic1"><img src="image/statics/demoPic-xxNew2.jpg"></a>
                <div class="ub-f ub ub-ver">
                    <div class="text1 ub-f ub ub-ver">
                        7日，商务部国际贸易经济合作研究院专家对天鼎投资说，“一带一路”国际合作高峰论坛
                    </div>
                    <a href="javascript:void(0);" class="linkDetail">[查看详情]</a>
                </div>
            </div>
        </div>
        <div class="newsList uf uf-ver">
            <a href="javascript:void(0);" class="news">李老师5月16日直播图文-信息安全板块的模</a>
            <a href="javascript:void(0);" class="news">李老师5月16日直播图文-信息安全板块的模</a>
            <a href="javascript:void(0);" class="news">李老师5月16日直播图文-信息安全板块的模</a>
            <a href="javascript:void(0);" class="news">李老师5月16日直播图文-信息安全板块的模</a>
        </div>
        <a href="javascript:void(0);" class="picLink"><img src="image/statics/productPic4.jpg"></a>


        <div class="titleT">五星擒牛</div>
        <div class="uf uf-ac otherComment">
            <div class="uf-f uf uf-ver uf-pj">
                <a href="javascript:void(0);" class="news">激进企业重仓的股票怎么退出？</a>
                <div class="uf uf-pj botInfo">
                    <div>武定门</div>
                    <div>2017.08.25</div>
                </div>
            </div>
            <img class="" src="image/statics/demoPic-xNew1.jpg">
        </div>
        <div class="uf uf-ac otherComment">
            <div class="uf-f uf uf-ver uf-pj">
                <a href="javascript:void(0);" class="news">激进企业重仓的股票怎么退出？</a>
                <div class="uf uf-pj botInfo">
                    <div>武定门</div>
                    <div>2017.08.25</div>
                </div>
            </div>
            <img class="" src="image/statics/demoPic-xNew1.jpg">
        </div>
        <div class="uf uf-ac otherComment">
            <div class="uf-f uf uf-ver uf-pj">
                <a href="javascript:void(0);" class="news">激进企业重仓的股票怎么退出？</a>
                <div class="uf uf-pj botInfo">
                    <div>武定门</div>
                    <div>2017.08.25</div>
                </div>
            </div>
            <img class="" src="image/statics/demoPic-xNew1.jpg">
        </div>
        <div class="uf uf-ac otherComment">
            <div class="uf-f uf uf-ver uf-pj">
                <a href="javascript:void(0);" class="news">激进企业重仓的股票怎么退出？</a>
                <div class="uf uf-pj botInfo">
                    <div>武定门</div>
                    <div>2017.08.25</div>
                </div>
            </div>
            <img class="" src="image/statics/demoPic-xNew1.jpg">
        </div>

        <a href="javascript:void(0);" class="picLink mt"><img src="image/statics/tdSchool.jpg"></a>
    </div>

</div>
<div id="footer" class="con ub">
    <div class="sides">
        <div>友情链接</div>
        <a href="javascript:void(0);" class="logoPot">天鼎证券</a>
    </div>
    <div class="center ub-f">
        <div class="uf uf-ac linksLine">
            <a href="javascript:void(0);" class="uf-f uf uf-ac uf-pc">关于我们</a>
            <a href="javascript:void(0);" class="uf-f uf uf-ac uf-pc">联系我们</a>
            <a href="javascript:void(0);" class="uf-f uf uf-ac uf-pc">法律声明</a>
            <a href="javascript:void(0);" class="uf-f uf uf-ac uf-pc">风险提示</a>
            <a href="javascript:void(0);" class="uf-f uf uf-ac uf-pc">常见问题</a>
            <a href="javascript:void(0);" class="uf-f uf uf-ac uf-pc">网站地图</a>
        </div>
        <div class="uf uf-pc">网站所载文章、数据仅供参考，使用前请核实，风险自负</div>
        <div class="uf  uf-pja">
            <a href="javascript:void(0);" class="uf">本网站资讯内容由江苏天鼎投资咨询有限公司提供</a>
            <a href="javascript:void(0);" class="uf">苏ICP备09015858号-6</a>
        </div>
    </div>
    <div class="sides">
        <div>公司二维码</div>
        <img src="image/statics/codePic.jpg">
    </div>
</div>

<div id="backTop" title="回到顶部" onclick="backToTop(this);"></div>

<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        swipeInit(); //轮播图初始化
        navFixedByScroll(); //监听滚动条修正顶部导航位置
        //课程表
        $(".liveTitle").mouseover(function () {
            var $title = $(this), index = $title.index();
            var tableArr = $(".liveTableDiv .table"), $table = $(tableArr[index]);
            $title.addClass("active").siblings().removeClass("active");
            $table.addClass("show").siblings().removeClass("show");

        });

    });

    //滚动回顶部
    function backToTop(ele) {
        $(ele).addClass("launch");
        setTimeout(function () {
            $('html,body').animate({scrollTop: 0}, 300);
            $(ele).removeClass("launch");
        }, 800);
    }

    //监听滚动条修正顶部导航位置
    function navFixedByScroll() {
        var $container = $(window);
        var $nav = $("#nav"),
                topH = $nav.position().top;
        var $backTop = $("#backTop"); //滚动到顶部的按钮元素
        //nav滚动到顶部时，定位在顶部
        $container.scroll(function () {
            var afterScrollTop = $container.scrollTop();
            if (afterScrollTop >= topH) {
                $nav.css({
                    "position": "fixed",
                    "top": 0
                });
                $backTop.show();
            } else {
                $nav.css({
                    "position": "absolute",
                    "top": topH
                });
                $backTop.hide();
            }
        });
    }

    //轮播图初始化
    function swipeInit() {
        //bannner图片轮播
        new Swiper('.swiper-container.banner', {
            pagination: '.swiper-pagination',//分页器（小点）
            paginationClickable: true,//分页器是否可点击
            autoplay: 5000,//自动轮播，毫秒数
            autoplayDisableOnInteraction: false,//用户手动操作后，是否停止自动轮播
            loop: true,//环路
            touchRatio: 0.5,//触摸距离与slide滑动距离的比率,默认：1,设置为0.5后slide滑动距离只有触摸距离的一半，降低滑动灵敏度
            lazyLoading: true,//允许图片的懒加载
            lazyLoadingInPrevNext: true,//允许将图片的懒加载应用到最接近的slide的图片（前一个和后一个slide）
            lazyLoadingOnTransitionStart: true,//图片的懒加载在过渡一开始就加载
            observer: true,//当Swiper元素变化时，例如window.resize，Swiper更新
            observeParents: true,//当Swiper的父元素变化时，例如window.resize，Swiper更新
            grabCursor: true//鼠标覆盖Swiper时指针会变成手掌形状，拖动时指针会变成抓手形状
        });
        //直播图片轮播
        new Swiper('.swiper-container.live', {
            scrollbar: '.swiper-scrollbar',//滚动条
            scrollbarHide: true,//是否隐藏滚动条
            autoplay: 3000,//自动轮播，毫秒数
            autoplayDisableOnInteraction: false,//用户手动操作后，是否停止自动轮播
            loop: true,//环路
            touchRatio: 0.5,//触摸距离与slide滑动距离的比率,默认：1,设置为0.5后slide滑动距离只有触摸距离的一半，降低滑动灵敏度
            lazyLoading: true,//允许图片的懒加载
            lazyLoadingInPrevNext: true,//允许将图片的懒加载应用到最接近的slide的图片（前一个和后一个slide）
            lazyLoadingOnTransitionStart: true,//图片的懒加载在过渡一开始就加载
            observer: true,//当Swiper元素变化时，例如window.resize，Swiper更新
            observeParents: true,//当Swiper的父元素变化时，例如window.resize，Swiper更新
            grabCursor: true//鼠标覆盖Swiper时指针会变成手掌形状，拖动时指针会变成抓手形状
        });
    }

    //加载评论
    (function () {
        var commentLis = [];

        function getComments(lastDate) {
            var data = {};
            var type = "get";
            if (lastDate) {
//                console.log(lastDate);
                data = {
                    lastDate: lastDate
                };
                type = "post";
            } else {
                commentLis = [];
            }
            $.ajax({
                url: 'http://127.0.0.8/mycenter/index.php/Home/Comment/getComment',
//            url: location.protocol+'//'+document.domain+'/mycenter/index.php/Home/Comment/getComment',
                type: type,
                data: data,
                dataType: "json",
                success: function (ret) {
                    Array.prototype.push.apply(commentLis, ret);
//                    console.log(ret);
//                console.log(commentLis);
                    var html = '';
                    if (ret && ret.length) {
                        html = '<div class="uf uf-ac dateLine">' +
                                '<div class="uf-f"></div>' +
                                '<div class="date">' + ret[0].date + '</div>' +
                                '<div class="uf-f"></div>' +
                                '</div>';
                        $.each(ret, function (index, item) {
                            var date = item.date;
                            var time = item.time;
                            var author = item.author;
                            var content = item.content;
                            html += '<div class="uf commentLi">' +
                                    '<div class="left">' +
                                    '<div class="time">' + time + '</div>' +
                                    '</div>' +
                                    '<div class="uf-f txt">' + content + '</div>' +
                                    '</div>';
                        });
                    } else {
                        html = '<p style="text-align: center;padding: 30px 0 50px 0;color: #bbbbbb;">没有更多评论了</p>';
                        getComments = function () {};//没有更多数据时清空函数，防止滚动到底部的触发
                    }
                    $(".container").append(html);
                    var len = commentLis.length;
                    if (len < 25 && ret && ret.length) {
                        getComments(commentLis[len - 1].date);
                    }

                }
            })
        }

        getComments();

        $(".refresh").click(function () {
            getComments();
        });

        $(window).scroll(function () {
            if ($(window).scrollTop() + $(window).height() == $(document).height()) {
                //已经滚动到底部
                if (commentLis && commentLis.length) {
                    getComments(commentLis[commentLis.length - 1].date);
                }
            }
        });

    })();
</script>
</body>
</html>